<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.4"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Embroidermodder: extern/libembroidery/src/geometry.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/x-mathjax-config">
MathJax.Hub.Config({
  extensions: ["tex2jax.js", "TeX/AMSmath.js"],
  jax: ["input/TeX","output/HTML-CSS"],
});
</script>
<script type="text/javascript" async="async" src="https://cdn.jsdelivr.net/npm/mathjax@2/MathJax.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
<link href="doxygen-awesome.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectlogo"><img alt="Logo" src="logo_embroidermodder_2_0.png"/></td>
  <td id="projectalign">
   <div id="projectname">Embroidermodder<span id="projectnumber">&#160;2.0.0-alpha4</span>
   </div>
   <div id="projectbrief">A free and open source software for machine embroidery</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.4 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(document).ready(function(){initNavTree('geometry_8c.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle"><div class="title">geometry.c File Reference</div></div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &lt;stdio.h&gt;</code><br />
<code>#include &lt;stdlib.h&gt;</code><br />
<code>#include &lt;math.h&gt;</code><br />
<code>#include &quot;<a class="el" href="embroidery_8h_source.html">embroidery.h</a>&quot;</code><br />
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="func-members" name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a85a825da7fbe0f04460724b80cc5844c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geometry_8c.html#a85a825da7fbe0f04460724b80cc5844c">embGeometry_init</a> (int type_in)</td></tr>
<tr class="memdesc:a85a825da7fbe0f04460724b80cc5844c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Our generic object interface backends to each individual type.  <a href="geometry_8c.html#a85a825da7fbe0f04460724b80cc5844c">More...</a><br /></td></tr>
<tr class="separator:a85a825da7fbe0f04460724b80cc5844c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9946219466f0f6a7b5a506703bc34e9d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geometry_8c.html#a9946219466f0f6a7b5a506703bc34e9d">embGeometry_free</a> (<a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *obj)</td></tr>
<tr class="memdesc:a9946219466f0f6a7b5a506703bc34e9d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Free the memory occupied by a non-stitch geometry object.  <a href="geometry_8c.html#a9946219466f0f6a7b5a506703bc34e9d">More...</a><br /></td></tr>
<tr class="separator:a9946219466f0f6a7b5a506703bc34e9d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a289ed9ab03a956588e081281ec112f4d"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geometry_8c.html#a289ed9ab03a956588e081281ec112f4d">embGeometry_move</a> (<a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *obj, <a class="el" href="embroidery_8h.html#a16fa26764453571074cb85a7574738d4">EmbVector</a> delta)</td></tr>
<tr class="memdesc:a289ed9ab03a956588e081281ec112f4d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Translate <em>obj</em> by the vector <em>delta</em>.  <a href="geometry_8c.html#a289ed9ab03a956588e081281ec112f4d">More...</a><br /></td></tr>
<tr class="separator:a289ed9ab03a956588e081281ec112f4d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afe82721878628886585c5a6d8db7d55e"><td class="memItemLeft" align="right" valign="top"><a class="el" href="embroidery_8h.html#ac2f33b151fc40a0da3b14379aa0ec653">EmbRect</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geometry_8c.html#afe82721878628886585c5a6d8db7d55e">embGeometry_boundingRect</a> (<a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *obj)</td></tr>
<tr class="memdesc:afe82721878628886585c5a6d8db7d55e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calculate the bounding box of geometry <em>obj</em> based on what kind of geometric object it is.  <a href="geometry_8c.html#afe82721878628886585c5a6d8db7d55e">More...</a><br /></td></tr>
<tr class="separator:afe82721878628886585c5a6d8db7d55e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae6461f57f08ce5992c70fa9897988644"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="geometry_8c.html#ae6461f57f08ce5992c70fa9897988644">embGeometry_vulcanize</a> (<a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *obj)</td></tr>
<tr class="memdesc:ae6461f57f08ce5992c70fa9897988644"><td class="mdescLeft">&#160;</td><td class="mdescRight">Toggle the rubber mode of the object.  <a href="geometry_8c.html#ae6461f57f08ce5992c70fa9897988644">More...</a><br /></td></tr>
<tr class="separator:ae6461f57f08ce5992c70fa9897988644"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Function Documentation</h2>
<a id="afe82721878628886585c5a6d8db7d55e" name="afe82721878628886585c5a6d8db7d55e"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afe82721878628886585c5a6d8db7d55e">&#9670;&nbsp;</a></span>embGeometry_boundingRect()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="embroidery_8h.html#ac2f33b151fc40a0da3b14379aa0ec653">EmbRect</a> embGeometry_boundingRect </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Calculate the bounding box of geometry <em>obj</em> based on what kind of geometric object it is. </p>
<p ><em>obj</em> A pointer to the geometry memory. </p><dl class="section return"><dt>Returns</dt><dd>EmbRect The bounding box in the same scale as the input geometry.</dd></dl>
<p>In the case of a failure the bounding box returned is always the unit square with top left corner at (0, 0). </p>

</div>
</div>
<a id="a9946219466f0f6a7b5a506703bc34e9d" name="a9946219466f0f6a7b5a506703bc34e9d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a9946219466f0f6a7b5a506703bc34e9d">&#9670;&nbsp;</a></span>embGeometry_free()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void embGeometry_free </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Free the memory occupied by a non-stitch geometry object. </p>
<p ><em>obj</em> Pointer to geometry memory. </p>

</div>
</div>
<a id="a85a825da7fbe0f04460724b80cc5844c" name="a85a825da7fbe0f04460724b80cc5844c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a85a825da7fbe0f04460724b80cc5844c">&#9670;&nbsp;</a></span>embGeometry_init()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> * embGeometry_init </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>type_in</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Our generic object interface backends to each individual type. </p>
<p ><em>type_in</em> </p><dl class="section return"><dt>Returns</dt><dd>EmbGeometry* </dd></dl>

</div>
</div>
<a id="a289ed9ab03a956588e081281ec112f4d" name="a289ed9ab03a956588e081281ec112f4d"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a289ed9ab03a956588e081281ec112f4d">&#9670;&nbsp;</a></span>embGeometry_move()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void embGeometry_move </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *&#160;</td>
          <td class="paramname"><em>obj</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="embroidery_8h.html#a16fa26764453571074cb85a7574738d4">EmbVector</a>&#160;</td>
          <td class="paramname"><em>delta</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Translate <em>obj</em> by the vector <em>delta</em>. </p>
<p ><em>obj</em> A pointer to the geometry memory. <em>delta</em> A vector in the 0.1mm scale to offset the geometry by. </p>

</div>
</div>
<a id="ae6461f57f08ce5992c70fa9897988644" name="ae6461f57f08ce5992c70fa9897988644"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae6461f57f08ce5992c70fa9897988644">&#9670;&nbsp;</a></span>embGeometry_vulcanize()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void embGeometry_vulcanize </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="embroidery_8h.html#aca7cafe21cb651b77560fece69fb1984">EmbGeometry</a> *&#160;</td>
          <td class="paramname"><em>obj</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Toggle the rubber mode of the object. </p>
<p ><em>obj</em> </p>
<dl class="todo"><dt><b><a class="el" href="todo.html#_todo000235">Todo:</a></b></dt><dd>Review. This could be controlled by a simple flag. </dd></dl>

</div>
</div>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="dir_dc9e1e299a0b26f222fe6c0a872463f0.html">extern</a></li><li class="navelem"><a class="el" href="dir_6a8aa8af2875e58e82a0145491f7a8e2.html">libembroidery</a></li><li class="navelem"><a class="el" href="dir_50a7dc5dba8160ac8332d90912e622db.html">src</a></li><li class="navelem"><a class="el" href="geometry_8c.html">geometry.c</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.4 </li>
  </ul>
</div>
</body>
</html>
